<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/static/common/taglibs.jsp" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<table cellpadding="0" cellspacing="0" border="0" id="orderTable">
    <tr>
        <th width="105">订单号</th>
        <th width="123">收货人</th>
        <th width="165">联系方式</th>
        <th width="92">价格</th>
        <th width="92">订单状态</th>
        <th width="103">订购时间</th>
        <th width="80">常规操作</th>
    </tr>

    <c:forEach items="${orders}" var="order">
        <tr>
            <th width="105">${order.orderNum}</th>
            <th width="123">${order.recieveUser}</th>
            <th width="165">${order.phone}</th>
            <th width="92"><fmt:formatNumber value="${order.sumPrice}" pattern="0"/></th>
            <th width="92">
                <c:if test="${order.status==0}">
                    未处理
                </c:if>
                <c:if test="${order.status==1}">
                    已处理
                </c:if>
            </th>
            <th width="103"><fmt:formatDate value="${order.submitTime}" pattern="yyyy-MM-dd"/></th>
            <th width="135"><a href="${ctx}/order/detail?id=${order.id}">查看详情</a>&nbsp;
                                    <a href="#" onClick="deleteOrder(${order.id})">取消订单</a></th>
        </tr>
    </c:forEach>
</table>